const getAllCategories=()=>{
    return $axios({
        url:'/category',
        method:'get'
    })
}

const addCategory=(params)=>{
    return $axios({
        url:'/category',
        method:'post',
        data: {...params}
    })


}

const deleteCategory=(id)=>{
    return $axios({
        url:`/category/${id}`,
        method:'delete'
    })
}
const findCategoryById=(id)=>{
    return $axios({
        url:`/category/${id}`,
        method:'get'
    })
}

const updateCategory=(params)=>{
    return $axios({
        url:'/category',
        method:'put',
        data: {...params}
    })
}

